
package tx.bj12320.model.enums;

import java.util.LinkedHashMap;

import cn.org.rapid_framework.lang.enums.EnumBase;
import cn.org.rapid_framework.lang.enums.EnumBaseUtils;

public enum WorkOrderTypeEnum implements EnumBase<String>{
	BYSLD(new String("BYSLD"),"表扬受理单"),
	JYSLD(new String("JYSLD"),"建议受理单"),
	JBSLD(new String("JBSLD"),"举报受理单"),
	TSWXCGZD(new String("TSWXCGZD"),"投诉未形成告知单"),
	TSXTD(new String("TSXTD"),"投诉协调单")
	;

	private final String code;
	private final String desc;
	WorkOrderTypeEnum(String code,String desc) {
		this.code = code;
		this.desc = desc;
	}

	public String getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}

	public static WorkOrderTypeEnum getByCode(String code) {
		return EnumBaseUtils.getByCode(code, values());
	}

	public static WorkOrderTypeEnum getRequiredByCode(String code) throws IllegalArgumentException {
		return EnumBaseUtils.getRequiredByCode(code, values());
	}

	@SuppressWarnings("unchecked")
	public static LinkedHashMap<String, String> toMap() {
	    return EnumBaseUtils.toMap(values());
	}
}
